<?php


class EchartsReport extends CI_Controller
{
    private $proLineTable;

    function __construct()
    {
        parent::__construct();
        $this->proLineTable = "gzrb_productline";
    }
    function index(){
        $info['site_template'] = 'rbReport';
        $info['site_templateurl'] = base_url('/html').'/'.$info['site_template'];
        $where = "1 = 1";
        $ldtyt_data = $this->Data_model->get_data($where,'','id asc',0,0,"gzrb_yipei_ldtyt");
        $res = array(
            'config'  => $info,
            'ldtyt'   => $ldtyt_data
        );
//        var_dump($res);exit;
        $this->load->view("rbReport/EchartsReport", $res);
    }

    function yiPeiReport(){
        $info['site_template'] = 'rbReport';
        $info['site_templateurl'] = base_url('/html').'/'.$info['site_template'];
        $where = "1 = 1";
        $ldtyt_data = $this->Data_model->get_data($where,'','id asc',0,0,"gzrb_yipei_ldtyt");
        $ejdjb_data = $this->Data_model->get_data($where,'','id asc',0,0,"gzrb_yipei_sbejdjb");
        $yjdjb_data = $this->Data_model->get_data($where,'','id asc',0,0,"gzrb_yipei_sbyjdjb");
        $res = array(
            'config'  => $info,
            'ldtyt'   => $ldtyt_data,
            'ejdjb'   => $ejdjb_data,
            'yjdjb'   => $yjdjb_data,
        );
        $this->load->view("rbReport/EchartsReport_yipei", $res);
    }

    //一配-露点推移图
    function yiPeiReport_ldtyt(){
        $info['site_template'] = 'rbReport';
        $info['site_templateurl'] = base_url('/html').'/'.$info['site_template'];
        $where = "1 = 1";
        $ldtyt_data = $this->Data_model->get_data($where,'','id asc',0,0,"gzrb_yipei_ldtyt");
        $productLine = $this->Data_model->get_data(array("status" => "1"), "","id asc",0,0,$this->proLineTable);
        $res = array(
            'config'  => $info,
            'ldtyt'   => $ldtyt_data,
            'productLine' => $productLine,
        );
        $this->load->view("rbReport/EchartsReport_yipei_ldtyt", $res);
    }

    //一配-设备一级点检表推移图
    function yiPeiReport_sbyjdjb(){
        $info['site_template'] = 'rbReport';
        $info['site_templateurl'] = base_url('/html').'/'.$info['site_template'];
        $where = "1 = 1";
        $sbyjdjb_data = $this->Data_model->get_data($where,'','id asc',0,0,"gzrb_yipei_sbyjdjb");
        foreach ($sbyjdjb_data as $key => $value){
            $sbyjdjb_data[$key]['protectiveGasPressure'] = $value['protectiveGasPressure'] * 1000;
        }
        $productLine = $this->Data_model->get_data(array("status" => "1"), "","id asc",0,0,$this->proLineTable);
        $res = array(
            'config'  => $info,
            'sbyjdjb'   => $sbyjdjb_data,
            'productLine' => $productLine,
        );
        $this->load->view("rbReport/EchartsReport_yipei_sbyjdjb", $res);
    }

    //一配-设备二级点检表推移图
    function yiPeiReport_sbejdjb(){
        $info['site_template'] = 'rbReport';
        $info['site_templateurl'] = base_url('/html').'/'.$info['site_template'];
        $where = "1 = 1";
//        $ldtyt_data = $this->Data_model->get_data($where,'','id asc',0,0,"gzrb_yipei_ldtyt");
        $sbejdjb_data = $this->Data_model->get_data($where,'','id asc',0,0,"gzrb_yipei_sbejdjb");
//        $sbyjdjb_data = $this->Data_model->get_data($where,'','id asc',0,0,"gzrb_yipei_sbyjdjb");
        $productLine = $this->Data_model->get_data(array("status" => "1"), "","id asc",0,0,$this->proLineTable);
        $title = "二级点检表推移图";
        $res = array(
            'config'  => $info,
            'productLine' => $productLine,
            'title' => $title,
            'sbejdjb'   => $sbejdjb_data,
        );
        $this->load->view("rbReport/EchartsReport_yipei_sbejdjb", $res);
    }

    //一配-混料间温湿度推移图(一配)
    function yiPeiReport_hljwsdtyt(){
        $info['site_template'] = 'rbReport';
        $info['site_templateurl'] = base_url('/html').'/'.$info['site_template'];
        $where = "1 = 1";
        $hljwsdtyt_data = $this->Data_model->get_data($where,'','id asc',0,0,"gzrb_yipei_hljwsdtyt");
        $productLine = $this->Data_model->get_data(array("status" => "1"), "","id asc",0,0,$this->proLineTable);
        $title = "混料间温湿度推移图(一配)";
        $res = array(
            'config'  => $info,
            'productLine' => $productLine,
            'title' => $title,
            'hljwsdtyt'   => $hljwsdtyt_data,
        );
        $this->load->view("rbReport/EchartsReport_yipei_hljwsdtyt", $res);
    }

    //一配-投料间温湿度推移图(投配料)
    function yiPeiReport_tljwsdtyt(){
        $info['site_template'] = 'rbReport';
        $info['site_templateurl'] = base_url('/html').'/'.$info['site_template'];
        $where = "1 = 1";
        $tljwsdtyt_data = $this->Data_model->get_data($where,'','id asc',0,0,"gzrb_yipei_tljwsdtyt");
        $productLine = $this->Data_model->get_data(array("status" => "1"), "","id asc",0,0,$this->proLineTable);
        $title = "混料间温湿度推移图(一配)";
        $res = array(
            'config'  => $info,
            'productLine' => $productLine,
            'title' => $title,
            'tljwsdtyt'   => $tljwsdtyt_data,
        );
        $this->load->view("rbReport/EchartsReport_yipei_tljwsdtyt", $res);
    }

    //一烧-设备一级点检表
    function yiShaoReport_sbyjdjb(){
        $info['site_template'] = 'rbReport';
        $info['site_templateurl'] = base_url('/html').'/'.$info['site_template'];
        $where = "1 = 1";
        $sbyjdjb_data = $this->Data_model->get_data($where,'','id asc',0,0,"gzrb_yishao_sbyjdjb");
        $productLine = $this->Data_model->get_data(array("status" => "1"), "","id asc",0,0,$this->proLineTable);
        $title = "设备一级点检表";
        $res = array(
            'config'  => $info,
            'productLine' => $productLine,
            'title' => $title,
            'sbyjdjb'   => $sbyjdjb_data,
        );
        $this->load->view("rbReport/EchartsReport_yishao_sbyjdjb", $res);
    }

    //一烧-设备二级点检表
    function yiShaoReport_sbejdjb(){
        $info['site_template'] = 'rbReport';
        $info['site_templateurl'] = base_url('/html').'/'.$info['site_template'];
        $where = "1 = 1";
        $sbejdjb_data = $this->Data_model->get_data($where,'','id asc',0,0,"gzrb_yishao_sbejdjb");
        $productLine = $this->Data_model->get_data(array("status" => "1"), "","id asc",0,0,$this->proLineTable);
        $title = "设备二级点检表";
        $res = array(
            'config'  => $info,
            'productLine' => $productLine,
            'title' => $title,
            'sbejdjb'   => $sbejdjb_data,
        );
        $this->load->view("rbReport/EchartsReport_yishao_sbejdjb", $res);
    }

    //一烧-窑炉氧含量监测记录表
    function yiShaoReport_ylyhljcjlb(){
        $info['site_template'] = 'rbReport';
        $info['site_templateurl'] = base_url('/html').'/'.$info['site_template'];
        $where = "1 = 1";
        $ylyhljcjlb_data = $this->Data_model->get_data($where,'','id asc',0,0,"gzrb_yishao_ylyhljcjlb");
        $productLine = $this->Data_model->get_data(array("status" => "1"), "","id asc",0,0,$this->proLineTable);
        $title = "窑炉氧含量监测记录表";
        $res = array(
            'config'  => $info,
            'productLine' => $productLine,
            'title' => $title,
            'ylyhljcjlb'   => $ylyhljcjlb_data,
        );
        $this->load->view("rbReport/EchartsReport_yishao_ylyhljcjlb", $res);
    }

    //破碎-设备一级点检表(单晶线1F)
    function poSuiReport_sbyjdjbdanj1f(){
        $info['site_template'] = 'rbReport';
        $info['site_templateurl'] = base_url('/html').'/'.$info['site_template'];
        $where = "1 = 1";
        $sbyjdjbdanj1f_data = $this->Data_model->get_data($where,'','id asc',0,0,"gzrb_posui_sbyjdjbdanj1f");
        $productLine = $this->Data_model->get_data(array("status" => "1"), "","id asc",0,0,$this->proLineTable);
        $title = "设备一级点检表(单晶线1F)";
        $res = array(
            'config'  => $info,
            'productLine' => $productLine,
            'title' => $title,
            'sbyjdjbdanj1f'   => $sbyjdjbdanj1f_data,
        );
        $this->load->view("rbReport/EchartsReport_posui_sbyjdjbdanj1f", $res);
    }

    //破碎-气流磨粉碎过程操作记录表
    function poSuiReport_qlmfsgcczjlb(){
        $info['site_template'] = 'rbReport';
        $info['site_templateurl'] = base_url('/html').'/'.$info['site_template'];
        $where = "1 = 1";
        $qlmfsgcczjlb_data = $this->Data_model->get_data($where,'','id asc',0,0,"gzrb_posui_qlmfsgcczjlb");
        $productLine = $this->Data_model->get_data(array("status" => "1"), "","id asc",0,0,$this->proLineTable);
        $title = "气流磨粉碎过程操作记录表";
        $res = array(
            'config'  => $info,
            'productLine' => $productLine,
            'title' => $title,
            'qlmfsgcczjlb'   => $qlmfsgcczjlb_data,
        );
        $this->load->view("rbReport/EchartsReport_posui_qlmfsgcczjlb", $res);
    }
}